public class Test {
    public static void main(String[] args) {
        String s1 ="abc";
        String s2 ="456";
        String tmp = s1;
        s1=s2;
        s2=tmp;
        System.out.println(s1);
        System.out.println(s2);
    }
}